Data copy is a customary operation in a storage system. Generally, a data copy command is used to copy data of a given length from a source address to a destination address. Therefore, data copy can be completed by two operations, namely, a read operation and a writ operation following the read operation. The read operation is used to read the data of the given length from the source address, while the write operation is used to write the data of the given length into the destination address.
In traditional buffer-based data copy, for the read operation or write operation, a requester (for example, a client module in a processing unit) needs to pre-allocate a buffer. If there is a cache in the system, each of the read operation and the write operation requires data migration between the cache and the pre-allocated buffer. In more advanced data copy, such data migration can be avoided (namely, it is not necessary for the requester to pre-allocate a buffer). In response to the read request or the write request for data copy, the cache can prepare respective cache pages based on the source address or the destination address and return a list including addresses of the respective cache pages (called “scatter-gather list”, SGL) to the requester so as to allow the requester to read/write the data from/to the cache directly.